<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>逐星科技社 - 首页</title>
    <script src="https://cdn.tailwindcss.com"></script>
    <link href="https://cdn.jsdelivr.net/npm/font-awesome@4.7.0/css/font-awesome.min.css" rel="stylesheet">
    <script>
        tailwind.config = {
            theme: {
                extend: {
                    colors: {
                        primary: '#165DFF',
                        secondary: '#69b1ff',
                        dark: '#0f172a',
                        light: '#f8fafc'
                    },
                    fontFamily: {
                        sans: ['Inter', 'system-ui', 'sans-serif'],
                    },
                }
            }
        }
    </script>
    <style type="text/tailwindcss">
        @layer utilities {
            .content-auto {
                content-visibility: auto;
            }
            .bg-glass {
                background: rgba(15, 23, 42, 0.7);
                backdrop-filter: blur(10px);
            }
            .text-gradient {
                background-clip: text;
                -webkit-background-clip: text;
                color: transparent;
                background-image: linear-gradient(90deg, #165DFF, #69b1ff);
            }

            /* 3D公告栏样式 */
            .announcement-3d-container {
                padding: 2rem 0;
                perspective: 1000px;
            }

            .shell {
                position: relative;
                width: 80vw;
                height: 40vw;
                max-width: 800px;
                max-height: 400px;
                margin: 0 auto;
                color: white;
                perspective: 1000px;
                transform-origin: center;
            }

            .content {
                display: flex;
                justify-content: center;
                align-items: center;
                position: absolute;
                width: 100%;
                height: 100%;
                transform-origin: center;
                transform-style: preserve-3d;
                transform: translateZ(-40vw) rotateY(0);
                animation: carousel 15s infinite cubic-bezier(0.77, 0, 0.175, 1) forwards;
            }

            .announcement-item {
                position: absolute;
                width: 80vw;
                height: 40vw;
                max-width: 800px;
                max-height: 400px;
                box-shadow: 0 5px 30px rgba(22, 93, 255, 0.3);
                border-radius: 8px;
                background-size: cover;
                background-position: center;
                overflow: hidden;
                cursor: pointer;
                transition: all 0.3s ease;
                -webkit-box-reflect: below 25px -webkit-linear-gradient(transparent 50%, rgba(255, 255, 255, 0.1));
            }

            .announcement-item:hover {
                box-shadow: 0 8px 40px rgba(22, 93, 255, 0.5);
            }

            .announcement-item::after {
                content: '';
                position: absolute;
                bottom: 0;
                left: 0;
                right: 0;
                height: 40%;
                background: linear-gradient(to top, rgba(15, 23, 42, 0.9), transparent);
            }

            .announcement-info {
                position: absolute;
                bottom: 0;
                left: 0;
                right: 0;
                padding: 1.5rem;
                z-index: 10;
                text-align: center;
            }

            .announcement-title {
                font-size: 1.8rem;
                font-weight: bold;
                margin-bottom: 0.5rem;
                transform: translateY(20px);
                opacity: 0;
                transition: all 0.5s ease 0.3s;
            }

            .announcement-item:hover .announcement-title {
                transform: translateY(0);
                opacity: 1;
            }

            /* 使用指定的两张图片，第三张复用第一张 */
            .announcement-item:nth-child(1) {
                background-image: url(images/广告位招租_1.jpg);
                transform: rotateY(0) translateZ(40vw);
            }

            .announcement-item:nth-child(2) {
                background-image: url(images/广告位招租_2.jpg);
                transform: rotateY(120deg) translateZ(40vw);
            }

            .announcement-item:nth-child(3) {
                background-image: url(images/广告位招租_3.jpg);
                transform: rotateY(240deg) translateZ(40vw);
            }

            /* 调整动画时间为15秒（每5秒切换一次） */
            @keyframes carousel {
                0%, 30% {
                    transform: translateZ(-40vw) rotateY(0);
                }
                35%, 65% {
                    transform: translateZ(-40vw) rotateY(-120deg);
                }
                70%, 100% {
                    transform: translateZ(-40vw) rotateY(-240deg);
                }
            }

            /* 指示器样式 */
            .carousel-indicators {
                display: flex;
                justify-content: center;
                gap: 0.75rem;
                margin-top: 2rem;
            }

            .carousel-indicator {
                width: 0.75rem;
                height: 0.75rem;
                border-radius: 50%;
                background-color: rgba(255, 255, 255, 0.3);
                cursor: pointer;
                transition: all 0.3s ease;
            }

            .carousel-indicator.active {
                background-color: #165DFF;
                transform: scale(1.3);
            }
        }
    </style>
</head>
<body class="bg-dark text-light min-h-screen">
    <!-- 导航栏 -->
    <header class="fixed top-0 left-0 right-0 z-50 bg-glass border-b border-gray-800">
        <div class="container mx-auto px-4 py-3 flex items-center justify-between">
            <div class="flex items-center">
                <img src="images/第一版团标.png" alt="逐星科技社团标" class="w-20 h-15 mr-3">
                <h1 class="text-xl font-bold">逐星科技社</h1>
            </div>

            <!-- 桌面导航 -->
            <nav class="hidden md:flex space-x-8">
                <a href="index.html" class="text-primary border-b-2 border-primary py-1">首页</a>
                <a href="about.html" class="hover:text-primary transition-colors py-1">关于我们</a>
                <a href="activities.html" class="hover:text-primary transition-colors py-1">社团活动</a>
                <a href="culture.html" class="hover:text-primary transition-colors py-1">社团文化</a>
                <a href="council.html" class="hover:text-primary transition-colors py-1">理事会</a>
                <a href="regulations.html" class="hover:text-primary transition-colors py-1">规章制度</a>
                <a href="join.html" class="hover:text-primary transition-colors py-1">加入我们</a>
                <a href="thanks.html" class="hover:text-primary transition-colors py-1">特别感谢</a>
            </nav>

            <!-- 移动端菜单按钮 -->
            <button class="md:hidden text-2xl" id="menuBtn">
                <i class="fa fa-bars"></i>
            </button>
        </div>

        <!-- 移动端导航菜单 -->
        <div class="md:hidden hidden bg-dark border-t border-gray-800" id="mobileMenu">
            <div class="container mx-auto px-4 py-3 flex flex-col space-y-4">
                <a href="index.html" class="text-primary py-2">首页</a>
                <a href="about.html" class="hover:text-primary transition-colors py-2">关于我们</a>
                <a href="activities.html" class="hover:text-primary transition-colors py-2">社团活动</a>
                <a href="culture.html" class="hover:text-primary transition-colors py-2">社团文化</a>
                <a href="council.html" class="hover:text-primary transition-colors py-2">理事会</a>
                <a href="regulations.html" class="hover:text-primary transition-colors py-2">规章制度</a>
                <a href="join.html" class="hover:text-primary transition-colors py-2">加入我们</a>
                <a href="thanks.html" class="text-primary py-2">特别感谢</a>
            </div>
        </div>
    </header>

    <!-- 英雄区域 -->
    <section class="pt-32 pb-20 px-4 relative overflow-hidden">
        <div class="absolute inset-0 overflow-hidden -z-10">
            <div class="absolute top-0 right-0 w-full h-full bg-[url('images/第一版社娘.png')] bg-contain bg-no-repeat opacity-10"></div>
            <div class="absolute top-1/4 left-1/4 w-96 h-96 rounded-full bg-primary/10 blur-3xl"></div>
        </div>

        <div class="container mx-auto max-w-6xl">
            <div class="flex flex-col md:flex-row items-center">
                <div class="md:w-1/2 mb-10 md:mb-0">
                    <h1 class="text-[clamp(2rem,5vw,3.5rem)] font-bold leading-tight mb-6">
                        探索未知，<br>
                        <span class="text-gradient">勇敢创新</span>
                    </h1>
                    <p class="text-gray-300 text-lg mb-8 max-w-lg">
                        逐星科技社是新宁一中充满梦想与激情的学生科技组织，致力于为每一位对科学与技术怀有热情的学生提供广阔的学习平台。
                    </p>
                    <div class="flex flex-wrap gap-4">
                        <a href="about.html" class="px-6 py-3 bg-primary hover:bg-primary/80 rounded-lg transition-all">
                            了解更多
                        </a>
                        <a href="join.html" class="px-6 py-3 bg-transparent border border-primary hover:bg-primary/10 rounded-lg transition-all">
                            加入我们
                        </a>
                    </div>
                </div>

                <div class="md:w-1/2 flex justify-center">
                    <img src="images/第一版社娘.png" alt="逐星科技社社娘" class="w-full max-w-md rounded-lg shadow-2xl shadow-primary/20">
                </div>
            </div>
        </div>
    </section>

    <!-- 3D翻转公告栏 -->
    <section class="py-10 px-4 bg-gray-800/50 border-y border-gray-700">
        <div class="container mx-auto max-w-6xl">
            <h2 class="text-2xl font-bold text-center mb-6">公告栏</h2>

            <div class="announcement-3d-container">
                <div class="shell">
                    <div class="content" id="announcementContent">
                        <!-- 三个公告项，使用指定的两张图片 -->
                        <div class="announcement-item">
                            <div class="announcement-info">
                                <div class="announcement-title">广告位招租</div>
                            </div>
                        </div>
                        <div class="announcement-item">
                            <div class="announcement-info">
                                <div class="announcement-title">广告位招租</div>
                            </div>
                        </div>
                        <div class="announcement-item">
                            <div class="announcement-info">
                                <div class="announcement-title">广告位招租</div>
                            </div>
                        </div>
                    </div>
                </div>

                <!-- 保留原点指示器 -->
                <div class="carousel-indicators">
                    <div class="carousel-indicator active" data-index="0"></div>
                    <div class="carousel-indicator" data-index="1"></div>
                    <div class="carousel-indicator" data-index="2"></div>
                </div>
            </div>
        </div>
    </section>

    <!-- 特色板块 -->
    <section class="py-16 px-4 bg-gray-900">
        <div class="container mx-auto max-w-6xl">
            <h2 class="text-3xl font-bold text-center mb-16">社团特色</h2>

            <div class="grid grid-cols-1 md:grid-cols-3 gap-8">
                <div class="bg-gray-800/50 p-6 rounded-xl hover:transform hover:scale-105 transition-all duration-300 border border-gray-700">
                    <div class="w-14 h-14 bg-primary/20 rounded-lg flex items-center justify-center mb-6">
                        <i class="fa fa-code text-2xl text-primary"></i>
                    </div>
                    <h3 class="text-xl font-semibold mb-3">多元技术学习</h3>
                    <p class="text-gray-400">
                        涵盖编程、建模、电子音乐制作等多个领域，为社员提供全方位的科技知识学习平台。
                    </p>
                </div>

                <div class="bg-gray-800/50 p-6 rounded-xl hover:transform hover:scale-105 transition-all duration-300 border border-gray-700">
                    <div class="w-14 h-14 bg-primary/20 rounded-lg flex items-center justify-center mb-6">
                        <i class="fa fa-users text-2xl text-primary"></i>
                    </div>
                    <h3 class="text-xl font-semibold mb-3">专业导师团队</h3>
                    <p class="text-gray-400">
                        由经验丰富的指导老师和学生导师组成，提供专业的技术指导和项目支持。
                    </p>
                </div>

                <div class="bg-gray-800/50 p-6 rounded-xl hover:transform hover:scale-105 transition-all duration-300 border border-gray-700">
                    <div class="w-14 h-14 bg-primary/20 rounded-lg flex items-center justify-center mb-6">
                        <i class="fa fa-rocket text-2xl text-primary"></i>
                    </div>
                    <h3 class="text-xl font-semibold mb-3">实践与创新</h3>
                    <p class="text-gray-400">
                        通过实际项目开发和竞赛参与，培养社员的创新思维和解决问题的能力。
                    </p>
                </div>
            </div>
        </div>
    </section>

    <!-- 最新活动 -->
    <section class="py-16 px-4">
        <div class="container mx-auto max-w-6xl">
            <div class="flex justify-between items-center mb-12">
                <h2 class="text-3xl font-bold">最新活动</h2>
                <a href="activities.html" class="text-primary hover:underline flex items-center">
                    查看全部 <i class="fa fa-arrow-right ml-2"></i>
                </a>
            </div>

            <div class="grid grid-cols-1 md:grid-cols-2 gap-8">
                <div class="bg-gray-800/30 rounded-xl overflow-hidden hover:shadow-lg hover:shadow-primary/10 transition-all">
                    <img src="images/编程组第一课.JPG" alt="编程组活动" class="w-full h-48 object-cover">
                    <div class="p-6">
                        <div class="text-sm text-gray-400 mb-2">2024年11月</div>
                        <h3 class="text-xl font-semibold mb-3">编程组第一课</h3>
                        <p class="text-gray-300 mb-4">
                            响应国家科技特长生培养需求，学习现代编程语言技术，塑造良好的编程语言启蒙环境。
                        </p>
                        <a href="activities.html" class="text-primary hover:underline">了解详情</a>
                    </div>
                </div>

                <div class="bg-gray-800/30 rounded-xl overflow-hidden hover:shadow-lg hover:shadow-primary/10 transition-all">
                    <img src="images/科创组第一课.JPG" alt="科创组活动" class="w-full h-48 object-cover">
                    <div class="p-6">
                        <div class="text-sm text-gray-400 mb-2">2024年12月</div>
                        <h3 class="text-xl font-semibold mb-3">科创组第一课</h3>
                        <p class="text-gray-300 mb-4">
                            弘扬青少年科技魅力，学习科创基础知识，由陈忠云老师带领参观工作室，了解大量科创知识。
                        </p>
                        <a href="activities.html" class="text-primary hover:underline">了解详情</a>
                    </div>
                </div>
            </div>
        </div>
    </section>

    <!-- 加入我们 -->
    <section class="py-16 px-4 bg-gradient-to-b from-gray-900 to-dark">
        <div class="container mx-auto max-w-4xl text-center">
            <h2 class="text-3xl font-bold mb-6">加入逐星科技社</h2>
            <p class="text-gray-300 mb-10 max-w-2xl mx-auto">
                无论你是对计算机代码感兴趣，还是热衷于创作数字艺术，又或是想要探索音频技术的奥秘，逐星科技社都为你提供了实现梦想的舞台。
            </p>
            <a href="join.html" class="inline-block px-8 py-4 bg-primary hover:bg-primary/80 rounded-lg text-lg font-medium transition-all transform hover:scale-105">
                立即加入
            </a>
        </div>
    </section>

    <!-- 页脚 -->
    <footer class="bg-gray-900 border-t border-gray-800 py-12 px-4">
        <div class="container mx-auto max-w-6xl">
            <div class="flex flex-col md:flex-row justify-between mb-10">
                <div class="mb-8 md:mb-0">
                    <div class="flex items-center mb-4">
                        <img src="images/第一版团标.png" alt="逐星科技社团标" class="w-20 h-15 mr-3">
                        <h3 class="text-xl font-bold">逐星科技社</h3>
                    </div>
                    <p class="text-gray-400 max-w-md">
                        探索未知、勇敢创新，逐星科技社致力于为每一位对科学与技术怀有热情的学生提供广阔的学习平台。
                    </p>
                </div>

                <div class="grid grid-cols-2 md:grid-cols-3 gap-8">
                    <div>
                        <h4 class="text-lg font-semibold mb-4">快速链接</h4>
                        <ul class="space-y-2">
                            <li><a href="index.html" class="text-gray-400 hover:text-primary">首页</a></li>
                            <li><a href="about.html" class="text-gray-400 hover:text-primary">关于我们</a></li>
                            <li><a href="activities.html" class="text-gray-400 hover:text-primary">社团活动</a></li>
                            <li><a href="join.html" class="text-gray-400 hover:text-primary">加入我们</a></li>
                        </ul>
                    </div>

                    <div>
                        <h4 class="text-lg font-semibold mb-4">资源中心</h4>
                        <ul class="space-y-2">
                            <li><a href="regulations.html" class="text-gray-400 hover:text-primary">规章制度</a></li>
                            <li><a href="culture.html" class="text-gray-400 hover:text-primary">社团文化</a></li>
                            <li><a href="council.html" class="text-gray-400 hover:text-primary">理事会</a></li>
                        </ul>
                    </div>

                    <div class="col-span-2 md:col-span-1">
                        <h4 class="text-lg font-semibold mb-4">联系我们</h4>
                        <ul class="space-y-2">
                            <li class="flex items-center text-gray-400">
                                <i class="fa fa-envelope mr-2"></i>
                                <a href="mailto:boluochuixue@outlook.com" class="hover:text-primary">boluochuixue@outlook.com</a>
                            </li>
                            <li class="flex items-center text-gray-400">
                                <i class="fa fa-qq mr-2"></i>
                                <span>1465153649</span>
                            </li>
                        </ul>
                    </div>
                </div>
            </div>

            <div class="border-t border-gray-800 pt-8 flex flex-col md:flex-row justify-between items-center">
                <p class="text-gray-500 text-sm mb-4 md:mb-0">
                    © 2024 逐星科技社 版权所有
                </p>
                <div class="flex space-x-6">
                    <a href="#" class="text-gray-400 hover:text-primary text-xl"><i class="fa fa-qq"></i></a>
                    <a href="#" class="text-gray-400 hover:text-primary text-xl"><i class="fa fa-weixin"></i></a>
                    <a href="#" class="text-gray-400 hover:text-primary text-xl"><i class="fa fa-envelope"></i></a>
                </div>
            </div>
        </div>
    </footer>

    <script>
        // 移动端菜单切换
        document.getElementById('menuBtn').addEventListener('click', function() {
            const mobileMenu = document.getElementById('mobileMenu');
            mobileMenu.classList.toggle('hidden');
        });

        // 滚动时导航栏样式变化
        window.addEventListener('scroll', function() {
            const header = document.querySelector('header');
            if (window.scrollY > 50) {
                header.classList.add('bg-dark/95');
                header.classList.remove('bg-glass');
            } else {
                header.classList.add('bg-glass');
                header.classList.remove('bg-dark/95');
            }
        });

        // 3D公告栏控制
        let currentSlide = 0;
        const totalSlides = 3;
        const content = document.getElementById('announcementContent');
        const indicators = document.querySelectorAll('.carousel-indicator');

        // 更新指示器状态
        function updateIndicators() {
            indicators.forEach((indicator, index) => {
                if (index === currentSlide) {
                    indicator.classList.add('active');
                } else {
                    indicator.classList.remove('active');
                }
            });
        }

        // 监听动画关键帧，更新当前幻灯片索引
        content.addEventListener('animationiteration', updateCurrentSlideFromAnimation);
        content.addEventListener('animationend', updateCurrentSlideFromAnimation);

        function updateCurrentSlideFromAnimation() {
            // 根据当前旋转角度计算当前幻灯片
            const transform = getComputedStyle(content).transform;
            const matrix = new DOMMatrix(transform);
            const rotation = Math.round(Math.atan2(matrix.m21, matrix.m11) * (180 / Math.PI));
            let normalizedRotation = (rotation % 360 + 360) % 360; // 标准化到0-360度

            // 根据旋转角度确定当前幻灯片
            if (normalizedRotation >= 330 || normalizedRotation <= 30) {
                currentSlide = 0;
            } else if (normalizedRotation >= 90 && normalizedRotation <= 150) {
                currentSlide = 1;
            } else if (normalizedRotation >= 210 && normalizedRotation <= 270) {
                currentSlide = 2;
            }

            updateIndicators();
        }

        // 鼠标悬停暂停动画
        content.addEventListener('mouseenter', () => {
            content.style.animationPlayState = 'paused';
        });

        // 鼠标离开继续动画
        content.addEventListener('mouseleave', () => {
            content.style.animationPlayState = 'running';
        });

        // 初始化
        updateIndicators();
    </script>
</body>
</html>